import requests,xlrd,json,time

def isReg(num):
	url = "https://www.izyz.org.cn/account/exit.do"
	head={'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36 Edg/86.0.622.38'}
	data = {"phone":num}
	res = requests.post(url=url,headers=head,data=data)
	#print(res.text)
	return  res.json()['code']#返回注册状态，1表示可注册，-1表示不可注册
filename='./file.xlsx'
data = xlrd.open_workbook(filename)# 打开文件
tables=data.sheet_names()
table = data.sheet_by_name(tables[0])#获取工作表Sheet1
phonelist=table.col_values(2,start_rowx=1, end_rowx=None)
print(phonelist)
for item in phonelist: 
	time.sleep(3)#延时
	print(isReg(int(item)))
	